#include<stdio.h>
#include<assert.h>

void* my_memcpy(void* dest, const void* src, size_t num)
{
	assert(dest && src);
	void* ret = dest;
	while (num--)
	{
		*(char*)dest = *(char*)src;
		dest = (char*)dest + 1;
		src = (char*)src + 1;
	}
	return ret;
}

int main()
{
	int  a[20] = {1,2,3,4,5,6};
	int b[20] = { 0 };
	my_memcpy(b, a, 6 * sizeof(int));
	return 0;
}